{% load bootstrap3 %}
<head>
  {% bootstrap_css %}
  {% bootstrap_javascript %}
</head>
<nav>
  <ul class="pagination">
  {% if page.has_previous %}
    <li class="disabled"><a href="?page={{ page.previous_page_number }}"><span aria-hidden="true">&laquo;</span><span class="sr-only">Previous</span></a></li>
  {% endif %}
    {% for page_number in page.paginator.page_range %}
      {% ifequal page_number  page.number %}
        <li class="active"><a href="?page={{ page_number }}">{{ page_number }}<span class="sr-only">(current)</span></a></li>
      {% else %}
        <li><a href="?page={{ page_number }}">{{ page_number }}</a>
        </li>
      {% endifequal %}
    {% endfor %}
  {% if page.has_next %}
    <li><a href="?page={{ page.next_page_number }}"><span aria-hidden="true">&raquo;</span><span class="sr-only">Next</span></a></li>
  {% endif %}
  </ul>
</nav>
